-
Notifications
You must be signed in to change notification settings - Fork 175
fix(ci): improve release notes generation and fix version format #90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's Guide更新发布 GitHub Actions 工作流,以从 git 历史生成自定义发布说明,导出规范化版本字符串供安装命令/文档链接使用,并使用英文示例和元数据对发布内容进行现代化改造。 更新后的 GitHub Actions 发布说明生成时序图sequenceDiagram
actor Maintainer
participant GitHubRepo
participant GitHubActions
participant actions_checkout_v4
participant release_notes_step
participant git_cli
participant action_gh_release_v2
Maintainer->>GitHubRepo: Push tag vX.Y.Z
GitHubRepo-->>GitHubActions: Trigger release workflow
GitHubActions->>actions_checkout_v4: Checkout repository (fetch-depth 0)
actions_checkout_v4-->>GitHubActions: Repository with full tag history
GitHubActions->>release_notes_step: Run Generate release notes step
release_notes_step->>release_notes_step: Read github.ref_name as VERSION
release_notes_step->>release_notes_step: Strip leading v to create VERSION_NO_V
release_notes_step->>git_cli: git describe --tags --abbrev=0 HEAD^
git_cli-->>release_notes_step: PREV_TAG or empty
alt Previous tag exists
release_notes_step->>git_cli: git log PREV_TAG..HEAD --no-merges
git_cli-->>release_notes_step: Commit list
release_notes_step->>GitHubActions: Set outputs CHANGELOG and VERSION_NO_V
else No previous tag
release_notes_step->>GitHubActions: Set outputs CHANGELOG="Initial release" and VERSION_NO_V
end
GitHubActions->>action_gh_release_v2: Create GitHub Release
action_gh_release_v2->>action_gh_release_v2: generate_release_notes true
action_gh_release_v2->>action_gh_release_v2: Use CHANGELOG as body prefix
action_gh_release_v2->>GitHubRepo: Publish Release with install commands using VERSION_NO_V
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your Experience访问你的 dashboard 以:
Getting HelpOriginal review guide in EnglishReviewer's GuideUpdates the release GitHub Actions workflow to generate custom release notes from git history, expose a normalized version string for use in installation/docs links, and modernizes the release body content with English-language usage examples and metadata. Sequence diagram for updated GitHub Actions release notes generationsequenceDiagram
actor Maintainer
participant GitHubRepo
participant GitHubActions
participant actions_checkout_v4
participant release_notes_step
participant git_cli
participant action_gh_release_v2
Maintainer->>GitHubRepo: Push tag vX.Y.Z
GitHubRepo-->>GitHubActions: Trigger release workflow
GitHubActions->>actions_checkout_v4: Checkout repository (fetch-depth 0)
actions_checkout_v4-->>GitHubActions: Repository with full tag history
GitHubActions->>release_notes_step: Run Generate release notes step
release_notes_step->>release_notes_step: Read github.ref_name as VERSION
release_notes_step->>release_notes_step: Strip leading v to create VERSION_NO_V
release_notes_step->>git_cli: git describe --tags --abbrev=0 HEAD^
git_cli-->>release_notes_step: PREV_TAG or empty
alt Previous tag exists
release_notes_step->>git_cli: git log PREV_TAG..HEAD --no-merges
git_cli-->>release_notes_step: Commit list
release_notes_step->>GitHubActions: Set outputs CHANGELOG and VERSION_NO_V
else No previous tag
release_notes_step->>GitHubActions: Set outputs CHANGELOG="Initial release" and VERSION_NO_V
end
GitHubActions->>action_gh_release_v2: Create GitHub Release
action_gh_release_v2->>action_gh_release_v2: generate_release_notes true
action_gh_release_v2->>action_gh_release_v2: Use CHANGELOG as body prefix
action_gh_release_v2->>GitHubRepo: Publish Release with install commands using VERSION_NO_V
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey - 我提供了一些高层面的反馈:
- 在同时使用
generate_release_notes: true并提供自定义body的情况下会显得多余且可能令人困惑;如果你打算完全依赖手动生成的CHANGELOG输出,建议移除generate_release_notes。 - 对于
git log ${PREV_TAG}..HEAD的调用,建议给范围加上引号(git log "${PREV_TAG}..HEAD"),并在使用标签变量时也加上引号,以防标签名包含意料之外的字符,这会让脚本更加健壮。
给 AI 智能体的提示
Please address the comments from this code review:
## Overall Comments
- Using `generate_release_notes: true` while also supplying a custom `body` is redundant and can be confusing; consider removing `generate_release_notes` if you intend to rely solely on the manually generated `CHANGELOG` output.
- For the `git log ${PREV_TAG}..HEAD` call, consider quoting the range (`git log "${PREV_TAG}..HEAD"`) and the tag variable usages in case tag names ever contain unexpected characters, which will make the script more robust.帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据你的反馈改进后续的评审。
Original comment in English
Hey - I've left some high level feedback:
- Using
generate_release_notes: truewhile also supplying a custombodyis redundant and can be confusing; consider removinggenerate_release_notesif you intend to rely solely on the manually generatedCHANGELOGoutput. - For the
git log ${PREV_TAG}..HEADcall, consider quoting the range (git log "${PREV_TAG}..HEAD") and the tag variable usages in case tag names ever contain unexpected characters, which will make the script more robust.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Using `generate_release_notes: true` while also supplying a custom `body` is redundant and can be confusing; consider removing `generate_release_notes` if you intend to rely solely on the manually generated `CHANGELOG` output.
- For the `git log ${PREV_TAG}..HEAD` call, consider quoting the range (`git log "${PREV_TAG}..HEAD"`) and the tag variable usages in case tag names ever contain unexpected characters, which will make the script more robust.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
由 Sourcery 提供的总结
改进 GitHub 发布流程,以生成更丰富的发布说明,并修正已发布版本的版本号格式。
CI:
Original summary in English
Summary by Sourcery
Improve the GitHub release workflow to generate richer release notes and correct version formatting for published releases.
CI: